Skip to content

Adds peers rpc to the bitcoin command group#813

Open
sr-gi wants to merge 1 commit into
bitcoin-dev-project:mainfrom
sr-gi:2026-07-bitcoin-peers
Open

Adds peers rpc to the bitcoin command group#813
sr-gi wants to merge 1 commit into
bitcoin-dev-project:mainfrom
sr-gi:2026-07-bitcoin-peers

Conversation

@sr-gi

@sr-gi sr-gi commented Jul 6, 2026

Copy link
Copy Markdown
Member

Adds a peers rpc that displays the peers of a given tank.

This is really useful to check connectivity against network graphs, and just as a general sense of who's connected to who.

e.g.

warnet bitcoin peers tank-0000

manual            tank-0004
manual            tank-0005
manual            tank-0006
manual            tank-0013
manual            tank-0014
manual            tank-0015
manual            tank-0019
manual            tank-0021
inbound           tank-0001
inbound           tank-0003
inbound           tank-0007
inbound           tank-0008
inbound           tank-0016

Adds a peers rpc that displays the peers of a given tank.

e.g.

warnet bitcoin peers tank-0000

manual            tank-0004
manual            tank-0005
manual            tank-0006
manual            tank-0013
manual            tank-0014
manual            tank-0015
manual            tank-0019
manual            tank-0021
inbound           tank-0001
inbound           tank-0003
inbound           tank-0007
inbound           tank-0008
inbound           tank-0016
@sr-gi sr-gi force-pushed the 2026-07-bitcoin-peers branch from 736c3b6 to e405c7b Compare July 6, 2026 15:35
@pinheadmz

Copy link
Copy Markdown
Contributor

I'm not opposed to adding this but the bitcoin-cli table is also available via RPC:

(.venv) --> warnet bitcoin rpc tank-0000 -netinfo 4
Bitcoin Core client v27.0.0 regtest - server 70016/Satoshi:27.0.0/

<->   type   net  v  mping   ping send recv  txn  blk  hb addrp addrl  age id address          version
 in         ipv4  2      0      0   79   79                              1  1 10.1.29.32:40930 70016/Satoshi:27.0.0/
out manual  ipv4  2      1      1   79   79                              1  0 tank-0001        70016/Satoshi:27.0.0/
                        ms     ms  sec  sec  min  min                  min

         ipv4    ipv6   total   block  manual
in          1       0       1
out         1       0       1       0       1
total       2       0       2

Local addresses
0.0.0.0                      port  18444    score      2
10.1.29.29                   port  18444    score      1
::                           port  18444    score      2
fe80::4c64:5bff:fe40:552     port  18444    score      1

@sr-gi

sr-gi commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

To me, the QoL of this the tank name mapping for inbounds. If you'd like to stick with -netinfo instead, what about capturing the return and mapping the IPs to the tank names before displaying?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants